package eerbaar.shared.tree;

import eerbaar.shared.internal.tree.Node;
import eerbaar.shared.internal.tree.Root;

public class NodeFactory {

    public static INode create(INode node) {
        return new Node(node);
    }

    public static INode create(IPayload payload) {
        return new Node(payload);
    }

    public static INode create(String key) {
        return new Node(new DefaultPayload(key));
    }

    public static INode create(String key, String value) {
        return new Node(new DefaultPayload(key, value));
    }

    public static IRoot createRoot() {
        return new Root();
    }

}
